home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume14 / mush6.0 / part13 < prev    next >
Encoding:
Internet Message Format  |  1988-04-12  |  39.8 KB

  1. From: island!argv@sun.com (Dan Heller)
  2. Subject: Mail User's Shell, version 6.0
  3.  
  4. #! /bin/sh
  5. # This is a shell archive.  Remove anything before this line, then unpack
  6. # it by saving it into a file and typing "sh file".  To overwrite existing
  7. # files, type "sh file -c".  You can also feed this as standard input via
  8. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  9. # will see the following message at the end:
  10. #        "End of archive 13 (of 14)."
  11. # Contents:  mush.1.c
  12. # Wrapped by rsalz@fig.bbn.com on Wed Apr 13 20:04:56 1988
  13. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  14. if test -f 'mush.1.c' -a "${1}" != "-c" ; then 
  15.   echo shar: Will not clobber existing file \"'mush.1.c'\"
  16. else
  17. echo shar: Extracting \"'mush.1.c'\" \(38739 characters\)
  18. sed "s/^X//" >'mush.1.c' <<'END_OF_FILE'
  19. X.sp
  20. X.ti +2
  21. pick -f island!argv@sun.com | sort s
  22. X.sp
  23. This finds all messages from the user \*Qisland!argv@sun.com\*U
  24. and sorts them by subject.
  25. Since these messages are already grouped together via the
  26. previous sort command, the sorting by subject (s) will restrict itself
  27. to such messages.
  28. You may specify the exact message list by specifying
  29. that message list on the command line and using a pipe:
  30. X.sp
  31. X.ti +2
  32. X10-. | sort d
  33. X.sp
  34. This command means to sort the messages from 10 to the current message
  35. according to the date.
  36. X.sp
  37. To specify subsorting from with the curses interface, the temporary
  38. curses escape key must be used (the colon `:') and the command issued
  39. at the command line given (as if giving an \*Qex\*U command to \*Qvi\*U).
  40. When the command is finished, the \*Q...continue...\*U prompt is given and
  41. the user may continue or return to the top level of the curses mode.
  42. X.sp
  43. In the tool interface, the user must map a function key to the desired
  44. command.
  45. Select the \*QOpts\*U icon with the right mouse button, choose
  46. the menu item labeled \*Qfunction keys\*U and use the interface provided
  47. to set a function key to the desired piped mechanism.
  48. X.TP
  49. X.B stop
  50. For systems with job control, stop will cause
  51. X.I Mush
  52. to send a SIGTSTP to itself.
  53. The command was introduced to facilitate
  54. the stop-job action from a complex command line alias rather than the user
  55. having to type his stop character explicitly.
  56. X.TP
  57. X.B top
  58. Takes a message list and prints the top few lines of each.
  59. The number of lines printed is controlled by the variable
  60. X.B toplines
  61. and defaults to the size of the value of the variable
  62. X.B crt.
  63. This command is ignored in the tool mode.
  64. X.SH VARIABLES
  65. Shell variables are controlled via the
  66. X.B set
  67. and
  68. X.B unset
  69. commands.
  70. Options may be either boolean, in which case it is only
  71. significant to see whether or not they are set;
  72. string, in which case the actual value is of interest;
  73. or numerical, in which the numerical value is important.
  74. Some variables may have attributes
  75. of boolean and string at the same time.
  76. X.sp
  77. If you or the program references a variable which is not explicitly set,
  78. then the environment variables are checked and a pointer to that data
  79. is returned.
  80. Following is a list of all predefined variables.
  81. X.TP
  82. X.B alwaysignore
  83. X(Boolean)
  84. If set, the mail headers set by the
  85. X.B ignore
  86. command are always ignored.
  87. Normally, ignored headers are not ignored when sending messages to
  88. the printer, when interpolating messages into letters with ~f or ~h,
  89. when the `P' or `T' command is given (see the \fBprint\f command),
  90. or with the -h flag to the
  91. X.B mail
  92. or
  93. X.B reply
  94. commands.
  95. Setting
  96. X.B alwaysignore
  97. will ignore those headers even in the situations mentioned here.
  98. No headers can be ignored during updates and when using the
  99. X.B save
  100. command since the user may ignore headers which are required by
  101. X.I Mush
  102. or any other mail system to read those folders.
  103. X.sp
  104. Also see the
  105. X.B ignore
  106. command for more information.
  107. X.TP
  108. X.B ask
  109. X(Boolean)
  110. If set, you will be prompted for a subject header for outgoing mail.
  111. If not set, the Subject header will be displayed as a blank header.
  112. Use the tilde escape \*Q~s\*U to set the header once in the message
  113. or specify the -s option on the
  114. X.B mail
  115. command line at the
  116. X.I Mush
  117. prompt.
  118. X.TP
  119. X.B askcc
  120. X(Boolean)
  121. If set, you will be prompted for a Cc (carbon copy) list when you are
  122. finished editing a letter to be sent.
  123. In the tool mode, this is ignored; the Cc list
  124. is always prompted for after the Subject prompt.
  125. X.TP
  126. X.B autodelete
  127. X(Boolean)
  128. When exiting mail, all messages which have been read
  129. X.I "regardless of whether they have been marked for deletion"
  130. are removed.
  131. Only messages that haven't been read or marked as
  132. X.BR preserved ,
  133. are not removed.
  134. X.TP
  135. X.B autoedit
  136. X(Boolean)
  137. If set, you are automatically put into your editor whenever you
  138. send or reply to mail.
  139. X.TP
  140. X.B autoinclude
  141. X(Boolean)
  142. When replying to any mail, a copy of the message being replied to
  143. is automatically inserted into your message body indented by
  144. the string described by the variable
  145. X.BR indent_str .
  146. X.TP
  147. X.B autoprint
  148. X(Boolean)
  149. After you delete a message, the next message is printed automatically.
  150. X.TP
  151. X.B auto_route
  152. X(Boolean)
  153. This variable has two functions, both of which only concern the command,
  154. X.BR replyall ,
  155. and is only important to users who use UUCP to mail to remote sites.
  156. The first function is to cause replyall to modify the return addresses
  157. of all recipients to route through the original sender's host.
  158. The problem with UUCP mail delivery is that mail delivery is frequently
  159. routed through other computers before the message finally gets to its
  160. destination.
  161. If the original sender of the message was on a remote
  162. machine which your machine does not exchange UUCP mail with, then a UUCP
  163. path containing hosts which you do talk to will have to be
  164. created to respond to the author.
  165. However, if he mailed to other people
  166. on machines which are also multi-hops away, the addresses he used for
  167. those recipients may differ from what you should specify if you were to
  168. try to reply to everyone on the listed in the original message.
  169. X.sp
  170. For example, if the original sender came from remote host,
  171. X.B pixar
  172. and the list of recipients looked like,
  173. X.sp
  174. X.nf
  175. X.in +2
  176. From: pixar!user1
  177. To: yourhost!you
  178. Cc: r2d2!user2, r2d2!user3
  179. X.in -2
  180. X.fi
  181. X.sp
  182. Clearly, \*Quser1\*U on the machine pixar can talk to your machine
  183. and the machine named r2d2.
  184. However, you would not be able to respond to those users if your machine
  185. did not exchange UUCP mail with the host r2d2.
  186. X.sp
  187. X.I Mush
  188. will attempt to solve this problem if
  189. X.B auto_route
  190. is set.
  191. An attempt will be made to compensate by reconstructing the addresses
  192. for \*Quser2\*U and \*Quser3\*U according to the address of the original
  193. sender, \*Quser1\*U.
  194. The new addresses for \*Quser2\*U and \*Quser3\*U should therefore become,
  195. X.sp
  196. X.ti +2
  197. pixar!r2d2!user2, pixar!r2d2!user3.
  198. X.sp
  199. If your machine not only talks to pixar,
  200. but talks to r2d2 as well, it becomes unnecessary to route the mail
  201. through both pixar and r2d2.
  202. The variable
  203. X.B known_hosts
  204. may be set to a list of hosts which you know your machine to have
  205. UUCP mail connections with.
  206. This list is checked when constructing
  207. mail addresses and the shortest path is made by removing from the
  208. UUCP path those hosts which do not need to be called.
  209. See the entry for
  210. X.B known_hosts
  211. for more information.
  212. X.sp
  213. An additional feature of the
  214. X.B auto_route
  215. variable is that all redundant hostnames from UUCP pathnames are removed
  216. to avoid unnecessary UUCP connections and speed up mail delivery.
  217. Normally, this is the responsibility of the
  218. X.IR "Mail Transfer Agent" ,
  219. or MTA.
  220. But it might be the case where the MTA at your site is not
  221. smart enough to figure out such redundant paths.
  222. In either case, the algorithm for removing redundant hosts is simple and
  223. should probably be used.
  224. An example of how auto_route truncates UUCP paths:
  225. X.sp
  226. X.ti +2
  227. pixar!island!sun!island!argv
  228. X.sp
  229. Here, mail was probably originally sent to users at pixar and sun from
  230. somewhere undetermined now.
  231. Since sun and pixar do not talk to each other, the users on those machines may
  232. have responded to mail creating the type of addresses stated above.
  233. Here, it can be seen that we can reduce the path to the host
  234. X.IR island :
  235. X.sp
  236. X.ti +2
  237. pixar!island!argv
  238. X.sp
  239. See the MAIL ADDRESSES section for more detailed information
  240. about legal mail addresses.
  241. X.TP
  242. X.B autosign
  243. X(Boolean/string)
  244. Append a signature to outgoing mail.
  245. If this variable is set, but not to a string (e.g., boolean-true),
  246. then the file ~/.signature is used.
  247. X.sp
  248. Otherwise, the variable is interpreted in one of three ways.
  249. By default, the string is interpreted as a pathname relative to the
  250. X.I current
  251. directory.
  252. For this reason, it is advisable to use full pathnames here.
  253. As usual, the special characters `~' and `+' are expanded.
  254. If a file is found, it is opened and its contents are read into the
  255. message buffer.
  256. X.sp
  257. If the variable is set to a string that begins with `$', then that string
  258. is interpreted as a user-definable variable and is expanded and appended
  259. to the letter.
  260. X.sp
  261. Finally, if the variable is set to a string that begins with a backslash (\\),
  262. then the string itself (minus the `\\' character) is used; no expansion
  263. is done and no files are read.
  264. X.sp
  265. In the latter two cases, it is advisable to set the variable using single
  266. quotes to avoid expanding the variable beforehand or eliminating the
  267. backslash.
  268. Examples,
  269. X.sp
  270. X.ti +2
  271. set autosign = '$foo'
  272. X.ti +2
  273. set autosign = '\\  Dan Heller island!argv@ucbcad.berkeley.edu'
  274. X.sp
  275. Warning: if redirection from the calling shell is used, there will be
  276. no signature or forutne added to outgoing mail.  For example,
  277. X.sp
  278. X.ti +2
  279. X% mush -s report manager < report_file
  280. X.sp
  281. In this command, mail is being sent to the user \*Qmanager\*U and the
  282. subject is set to \*Qreport\*U and the file \*Qreport_file\*U is being
  283. redirected as input.  In this case, there will be \fIno\fR signature
  284. appended.
  285. X.TP
  286. X.B autosign2
  287. X(String)
  288. This alternate signature is available for special cases where the default
  289. signature is not desired or if no signture is desired for special addresses
  290. or if special addresses only require a signature.
  291. The format for this variable is:
  292. X.sp
  293. X.ti +2
  294. autosign2 = \*Qaddress1, address2, ... : <signature>\*U
  295. X.sp
  296. The addresses are legal mailing addresses but do not contain comment
  297. fields (see the sections MAIL ADDRESSES for more information on legitimate
  298. mail addresses).
  299. The signature description is the same as described by
  300. X.B autosign
  301. above.  The colon (:) separates the list of addresses from the signature
  302. description.  If there is no colon or the address list is missing, the
  303. entire string is considered the signature (except for the colon).
  304. X.sp
  305. If
  306. X.B autosign
  307. is not set, then autosign2 will ONLY work if the tilde command \*Q~S\*U
  308. is specified.  In this way, a user may never have autosign set and just
  309. set autosign2 to be some signature value.  The user may then issue the
  310. tilde command to automatically sign the letter.
  311. If a list of addresses is given (terminated by a colon), then all
  312. recipients of the message must be in the list of addresses in autosign2;
  313. otherwise, the signature in \fBautosign\fR (if set) is used instead.
  314. A null signature in autosign2 will not sign the letter.
  315. X.sp
  316. Example:
  317. X.ti +2
  318. set autosign2 = "fred, barney, wilma, betty: ~/flintstone.sig"
  319. X.sp
  320. If a message is sent to:
  321. X.sp
  322. X.ti +2
  323. To: fred, wilma
  324. X.sp
  325. Then the file ~/flinstone.sig will be used.
  326. However, if the address were:
  327. X.sp
  328. X.ti +2
  329. To: barney, betty, bambam
  330. X.sp
  331. Then autosign2 will not be used because bambam is not in the list.
  332. X.sp
  333. Note that mail sent via redirection from the calling shell will not
  334. sign letters or append fortunes.
  335. X.TP
  336. X.B cdpath
  337. X(String)
  338. Set to a string of pathnames separated by spaces to use when searching
  339. for a directory when the
  340. X.B cd
  341. command is issued.
  342. If this variable is used, it is recommended that the path `.' be included.
  343. Note that this differs from the
  344. X.IR csh ,
  345. which does not require that `.' be present.
  346. X.TP
  347. X.B crt
  348. X(Numeric)
  349. Set to a value which describes the number of lines a message
  350. must have before invoking the
  351. X.B pager
  352. to view a message.
  353. X.TP
  354. X.B cwd
  355. X(String)
  356. The
  357. X.B "current working directory"
  358. string is automatically set upon startup of
  359. X.I Mush
  360. and is reset each time the command
  361. X.BR cd ,
  362. is called.
  363. It is referenced each time
  364. X.B pwd
  365. is called and may be used as any other shell variable.
  366. X.TP
  367. X.B dead
  368. X(String)
  369. File to use instead of dead.letter when interrupted mail is saved.
  370. For more information, see the variable,
  371. X.B nosave.
  372. X.TP
  373. X.B dot
  374. X(Boolean)
  375. Accepts a `.' on a line by itself, in addition to `^D', to terminate messages.
  376. X.TP
  377. X.B editor
  378. X(String)
  379. Editor to use when \*Q~e\*U is specified.
  380. Default is the value of the variable
  381. X.BR visual .
  382. X.TP
  383. X.B escape
  384. X(Character)
  385. When typing in a letter (not in an editor), when the
  386. X.B escape
  387. character is the first character on the line, the following character
  388. is examined and a corresponding function associated with that
  389. X.B "escape command"
  390. is executed.
  391. See
  392. X.B "tilde escapes"
  393. for more information.
  394. X.TP
  395. X.B folder
  396. X(String)
  397. The folder variable is set to a path where folders are kept.
  398. X\&~/Mail is the default value.
  399. X.TP
  400. X.B fortune
  401. X(Boolean/string)
  402. If fortune is set, a random fortune is appended to the end of
  403. all outgoing mail using the
  404. X.I UNIX
  405. command
  406. X.B /usr/games/fortune
  407. X(may vary from system to system).
  408. If fortune is set to something that starts with
  409. a `\-', then it is interpreted as a flag to fortune (e.g., \*Q\-o\*U).
  410. If
  411. X.B fortune
  412. starts with a `/', then the program described by
  413. the string is executed (thus not doing fortune at all, if you want).
  414. By default,
  415. X.I "fortune \-s"
  416. X(short fortunes) is used.
  417. X.TP
  418. X.B fortunates
  419. X(String)
  420. When fortunes are added to messages, sometimes it is desireable to
  421. make sure that only a selected group of people get a fortune since
  422. certain people may not understand the messages at the end of your
  423. mail.  Therefore, you can set a list of addresses (either pure addresses
  424. or aliases which are expanded to addresses) to be the only people who
  425. receive fortunes if one is to be appended.  Therefore,
  426. if the To: and Cc: lines contain only address listed in this string
  427. variable, then a fortune is appended to the message.
  428. If those lists contain names which are not on the fortunates
  429. list, then no fortune is added.
  430. This cannot be overriden; using the
  431. tilde command \*Q~F\*U does not force a fortune to be added unless the
  432. list of individuals on the recipient list are all included in the fortunates
  433. list.  The list is made up of addresses or aliases separated by spaces or
  434. commas.
  435. X.I "NOTE: fortune must be set in order for fortunates to work."
  436. X.TP
  437. X.B hdr_format
  438. X(String)
  439. This variable controls the format of the headers displayed by the
  440. X.B headers
  441. command and in the curses and graphics modes.
  442. The format style of this variable string is similar to printf in C.
  443. When printing the information, the variable is evaluated and each
  444. character in the string is echoed unless a `%' character is
  445. encountered.
  446. If one is found, the following string substitutions are made:
  447. X.sp
  448. X.in +2
  449. X.nf
  450. X.ta 0.5i
  451. X%a    address of the author
  452. X%c    number of characters (bytes) in the message
  453. X%f    entire \*QFrom:\*U field (author)
  454. X%l    number of lines in the message
  455. X%n    name of the author
  456. X%s    subject of the message
  457. X%t    \*QTo:\*U field (recipients)
  458. X%d    entire date of the message
  459. X%T    the time only of the message
  460. X%N    the day number of the month of the message
  461. X%D    the day or the week (Sun, Mon, etc.)
  462. X%M    the month name of the message
  463. X%Y    the year of the message
  464. X\\n    a newline
  465. X\\t    a tab
  466. X.fi
  467. X.in -2
  468. X.sp
  469. A field width specifier may be used in all options.
  470. Thus, \*Q%20f\*U will print the
  471. first 20 characters of the from line.
  472. No matter what the formatting string, the message number
  473. followed by a `>' (for current message) is printed.
  474. X.sp
  475. The \*Qaddress\*U and \*Qname\*U of the author
  476. are extracted from the \*QFrom:\*U field of the message.
  477. The name may be given in parentheses and
  478. the rest of the line is the address, or the address is given in angle
  479. brackets (`<' and `>') and the rest of the line is the name.
  480. Sometimes the address is the only thing on the line,
  481. in which case the name and address are the same.
  482. X.sp
  483. X.TP
  484. X.B hold
  485. X(Boolean)
  486. Normally, on termination of mail, read messages are saved in
  487. your mbox (except those marked as preserved).
  488. Setting
  489. X.B hold
  490. prevents this from happening,
  491. and messages remain in /usr/spool/mail/user.
  492. This does not apply to folders, obviously.
  493. X.TP
  494. X.B home
  495. X(String)
  496. This variable describes the user's home directory.
  497. The variable is initialized to the value of the environment variable HOME,
  498. but can be modified at any time during the
  499. X.I Mush
  500. session.
  501. The home directory is the same directory where temporary
  502. files are kept for editing and so forth.
  503. If the home directory cannot be found or read/write access is denied, an
  504. alternate directory, typically /tmp, is used.
  505. X.TP
  506. X.B ignore_bang
  507. X(Boolean)
  508. If set,
  509. X.I Mush
  510. will ignore the `!' character as a history reference.
  511. X.TP
  512. X.B ignoreeof
  513. X(Boolean/string)
  514. If set, `^D' will not exit from
  515. X.IR Mush .
  516. If set to a string, that string is executed as a command
  517. when `^D' is typed.
  518. This does not effect termination of messages under the
  519. X.B mail
  520. and
  521. X.B reply
  522. commands.
  523. X.TP
  524. X.B in_reply_to
  525. X(String)
  526. This variable may be set to a string which will complete the
  527. header \*QIn-Reply-To:\*U.
  528. The format of this string is identical to the options for the variable
  529. X.BR hdr_format .
  530. X.sp
  531. For example, if the user were to respond to a message
  532. from Dan Heller that was sent on October 21, 1987 at 10:39pm, with
  533. X.B in_reply_to
  534. set to the string
  535. X.in +2
  536. X.sp
  537. X%n's message as of %d.
  538. X.sp
  539. X.ti -2
  540. the header line
  541. X.sp
  542. In-Reply-To: Dan Heller's message as of Oct 21, 1987 10:39pm.
  543. X.in-2
  544. X.sp
  545. would be added to the message.
  546. X.TP
  547. X.B indent_str
  548. X(String)
  549. When including messages into the text of a letter you are editing,
  550. each line of the messages is preceded by the value of
  551. X.BR indent_str .
  552. If it is unset, the message body is indented by the string \*Q> \*U.
  553. See also the variables
  554. X.B pre_indent_str
  555. and
  556. X.BR post_indent_str .
  557. X.TP
  558. X.B keepsave
  559. X(Boolean)
  560. If set, the commands
  561. X.B save
  562. and
  563. X.B write
  564. will
  565. X.I not
  566. mark messages for deletion.
  567. X.TP
  568. X.B known_hosts
  569. X(String)
  570. Used in conjunction with the variable
  571. X.BR auto_route ,
  572. this variable is set to a list of hosts, separated by spaces, tabs,
  573. and/or commas, and describes
  574. the hosts with whom you know your machine shares UUCP connections.
  575. When replying to mail, many times you will see that the return path
  576. constructed will have hostnames which your site could call, but instead
  577. the mail has been routed through a number of different machines first.
  578. X.sp
  579. For example, if you respond to mail which would mail to the path,
  580. X.sp
  581. X.ti +2
  582. unicom!pixar!root
  583. X.sp
  584. but your know your machine already calls pixar, then sending the mail
  585. to unicom first is unnecessary.
  586. If you have set your known_hosts string to include pixar in its list,
  587. the resulting address would look like,
  588. X.sp
  589. X.ti +2
  590. pixar!root
  591. X.sp
  592. Also see the command
  593. X.B replyall
  594. for more information on constructing correct return addresses.
  595. X.TP
  596. X.B lister
  597. X(String)
  598. Default arguments to the \*Qls\*U command for printing the
  599. contents of a directory.
  600. X.TP
  601. X.B mbox
  602. X(String)
  603. Set to the pathname of a file you'd like mush to use as the default
  604. holder for read mail.
  605. The default is ~/mbox.
  606. X.TP
  607. X.B metoo
  608. X(Boolean)
  609. When replying to mail, you are normally deleted from the list of
  610. recipients.
  611. If metoo is set, you remain on the list.
  612. See the 
  613. X.B alternates
  614. command
  615. for information on determining whether or not you're even on the list.
  616. X.TP
  617. X.B mil_time
  618. X(Boolean)
  619. Whenever the time is displayed in a message header or in the prompt,
  620. it can be displayed in either 12-hour am/pm format, or in 24 hour
  621. military time format.
  622. The default is the 12 hour format, but can be
  623. reset to use the 24 hour format by setting this variable.
  624. X.TP
  625. X.B newline
  626. X(Boolean/string)
  627. If set, carriage returns are ignored.
  628. If set to a string, that string is executed as a command when a
  629. carriage return is typed.
  630. Otherwise, carriage return prints the next undeleted message.
  631. X.TP
  632. X.B no_expand
  633. X(Boolean)
  634. When a
  635. X.I Mush
  636. alias is used to reference a list of addresses, the list is expanded on
  637. the To: and Cc: lines to indicate the complete list of all the recipients of
  638. the message.
  639. When no_expand is set, aliases are not expanded and the headers
  640. reflect the same information as typed by the user.
  641. X.TP
  642. X.B no_hdr
  643. X(Boolean)
  644. If set, this variable tells 
  645. X.I Mush
  646. not to include your personalized mail headers in messages.
  647. This does not unset your headers, it just disables them.
  648. X.TP
  649. X.B no_reverse
  650. X(Boolean)
  651. In curses mode and in the tool mode, reverse video is not used to indicate the 
  652. X.I "current message"
  653. if this variable is set.
  654. In the tool mode, if reverse video is not in use,
  655. text is displayed in \*Qbold\*U.
  656. X.TP
  657. X.B nosave
  658. X(Boolean)
  659. When composing a letter, the user can terminate the letter without
  660. sending it using the tidle escape \*Q~q\*U or by sending two \*Qinterrupt\*U
  661. signals.
  662. When the message is terminated, a copy of it is saved to the
  663. file \*Qdead.letter\*U in the user's home directory or to the file described
  664. by the variable,
  665. X.BR dead .
  666. If the variable,
  667. X.B nosave
  668. is set, then a backup copy of the message will not be saved.
  669. X.TP
  670. X.B pager
  671. X(String)
  672. If a message is longer than the number of lines that the variable
  673. X.B crt
  674. is set to, then this program is executed to view a message.
  675. If the user does not have this variable set, the user's environment PAGER
  676. is checked.
  677. If this isn't set, then the default value for pager (set up
  678. by the system manager) is used.
  679. This may or may not be the internal pager.
  680. To use the internal pager, you may set the variable pager to
  681. X.I internal
  682. or to a null string.
  683. X.TP
  684. X.B pre_indent_str
  685. X(String)
  686. If this variable is set, when including the body of a message into an outgoing
  687. mail message (using the \-i option to
  688. X.I reply
  689. or
  690. X.IR mail ,
  691. or when using the \*Q~i\*U escape),
  692. a line preceding the first line of
  693. included text is printed using the string value of the variable.
  694. This string uses the same printf style formatting characters as the
  695. X.B hdr_format
  696. variable.
  697. For example, you could set
  698. X.B pre_indent_str
  699. as follows:
  700. X.sp
  701. X.ti +2
  702. set pre_indent_str = '[In the message entitled "%s", on %7d\n %n writes:]'
  703. X.sp
  704. You can then include a message body using \*Q~i\*U, and you might
  705. get something like this:
  706. X.sp
  707. X.in +2
  708. X.nf
  709. X[In the message entitled "This is a test.", on Jan 19,
  710. X Dan Heller writes:]
  711. X> This is a test message to show how
  712. X> pre_indent_str might be used.
  713. X.ti -2
  714. X.sp
  715. X.fi
  716. This example assumes that the string value of
  717. X.B indent_str
  718. is not set.
  719. X.TP
  720. X.B post_indent_str
  721. X(String)
  722. This variable has the same function as
  723. X.B pre_indent_str
  724. except that the string is inserted into the message body
  725. X.I after
  726. the text of the included message rather than before.
  727. The purpose of this variable is to complement the string described by
  728. the variables
  729. X.B pre_indent_str
  730. and
  731. X.BR indent_str .
  732. For example,
  733. X.sp
  734. X.in +2
  735. X.nf
  736. set pre_indent_str = "/*"
  737. set indent_str = " * "
  738. set post_indent_str = " */"
  739. X.sp
  740. X.ti -2
  741. An included message might look something like this:
  742. X.sp
  743. X/*
  744. X * This is a test message to show how
  745. X * post_indent_str and pre_indent_str
  746. X * can work together with indent_str.
  747. X */
  748. X.fi
  749. X.in -2
  750. X.TP
  751. X.B printer
  752. X(String)
  753. Used to set the default printer for the lpr command.
  754. X.TP
  755. X.B print_cmd
  756. X(String)
  757. This string should describe UNIX command other than "lpr" for sending
  758. messages to the line printer.
  759. Some people may choose to use a device independent
  760. troff style program, but virtually any UNIX command will suffice.
  761. Common usage might include:
  762. X.sp
  763. X.ti +2
  764. set print_cmd = 'ptroff -ms -Plp'
  765. X.ti +2
  766. lpr .-$
  767. X.sp
  768. This command would send all messages from the current message to the last
  769. message through the ptroff command, supplying the appropriate arguments.
  770. Uncommon, but legal usage might include:
  771. X.sp
  772. X.ti +2
  773. set print_cmd = 'write frank ttyp0'
  774. X.ti +2
  775. lpr *
  776. X.sp
  777. This command will send all your messages through to the \*Qwrite\*U
  778. program and display them on Frank's terminal.
  779. X.sp
  780. X.TP
  781. X.B prompt
  782. X(String)
  783. You can set your prompt to tell you many different pieces of information.
  784. By default, the prompt is set to the string,
  785. X.sp
  786. X.ti +2
  787. X\*QMsg %m of %t: \*U
  788. X.sp
  789. If you have 10 messages and your current message is 5, then your prompt
  790. would look like:
  791. X.sp
  792. X.ti +2
  793. Msg 5 of 10:
  794. X.sp
  795. The string value that prompt is set to will be printed as your prompt.
  796. If the string contains a `%', then that character is
  797. ignored, the next character is evaluated and an appropriate
  798. value is printed in its place:
  799. X.sp
  800. X.nf
  801. X.in +2
  802. X.ta 0.5i
  803. X%d    number of deleted messages
  804. X%D    today's day (Sun, Mon, Tue, ...)
  805. X%f    filename of the current folder
  806. X%m    \*Qcurrent message\*U number
  807. X%n    number of \*Qnew\*U messages
  808. X%N    today's date (Number of the day in the month)
  809. X%T    current time (hours and seconds)
  810. X%t    total number of messages
  811. X%u    number of unread messages
  812. X%Y    this year
  813. X\\n    a newline
  814. X\\t    a tab
  815. X.fi
  816. X.in -2
  817. X.TP
  818. X.B quiet
  819. X(Boolean)
  820. If set, the currently running version of
  821. X.I Mush
  822. is not printed on startup.
  823. X.TP
  824. X.B record
  825. X(String)
  826. Set to the name of a file to record all outgoing mail.
  827. This should be a full pathname or the current directory is searched.
  828. The pathname may begin with `+' (indicating the user's ~/Mail directory
  829. or the value of the 
  830. X.B folder
  831. variable) or with a `~' (or \*Q~user\*U)
  832. indicating the user's home directory.
  833. X.TP
  834. X.B reply_to_hdr
  835. X(String)
  836. When replying to mail,
  837. X.I Mush
  838. searches for return paths from the message by searching for
  839. the message headings \*QReply-to\*U, \*QReturn-path\*U, and \*QFrom:\*U,
  840. in that order.
  841. If none are found, then the first line of the
  842. message created by the delivery system is parsed and the address
  843. given there is used.
  844. If the variable
  845. X.B reply_to_hdr
  846. is set to a of headers (delimited by spaces or commas), then that list
  847. is searched.
  848. If none of the headers listed in the variable exist
  849. in the message, then a warning message is printed and the default
  850. headers are used.
  851. See the
  852. X.B reply
  853. command for more details.
  854. X.TP
  855. X.B sendmail
  856. X(String)
  857. If set, the program and arguments described by this variable will
  858. be executed to actually deliver mail sent by
  859. X.I Mush.
  860. X.TP
  861. X.B screen
  862. X(Numeric)
  863. May be set to the number of message headers to display at a time in the
  864. line and curses modes.
  865. X.TP
  866. X.B screen_win
  867. X(Numeric)
  868. Man be set to the number of message headers to display in the tool mode.
  869. A subwindow is created for message headers, and its size is large
  870. enough to hold $screen_win headers.
  871. X.TP
  872. X.B show_deleted
  873. X(Boolean)
  874. If true, deleted message headers are displayed along with
  875. other messages ('*' indicates a deleted message).
  876. In curses mode, this variable is ignored and deleted messages are always
  877. displayed with other messages to facilitate undeleting messages.
  878. X.TP
  879. X.B show_hdrs
  880. X(String)
  881. Set to a list (space and/or comma separated) of headers which are to be the
  882. only headers displayed when viewing a message.
  883. This variable disables the headers supressed by the
  884. X.B ignore
  885. command.
  886. For example,
  887. X.sp
  888. X.ti +2
  889. set show_hdrs = "from date subject to cc"
  890. X.sp
  891. will only display the headers,
  892. X.B From: Date: Subject: To: Cc:
  893. in their entirety.
  894. X.TP
  895. X.B sort
  896. X(Boolean/string)
  897. The value of this variable is the same as the arguments to the
  898. X.B sort
  899. command.
  900. This variable is used for the initialization file to presort
  901. mail in the system mailbox upon entering mush.
  902. See the COMMANDS section for more information.
  903. X.TP
  904. X.B squeeze
  905. X(Boolean)
  906. Whenever messages are read, piped, or saved, if this variable is set,
  907. all consecutive blank lines are squeezed into one blank line.
  908. X.TP
  909. X.B toplines
  910. X(Numeric)
  911. The number of lines of a message to print when the "top" command
  912. is issued.
  913. If unset, $crt lines are printed.
  914. X.TP
  915. X.B unix
  916. X(Boolean)
  917. If set, commands which are not
  918. X.I Mush
  919. commands are considered to be
  920. X.I UNIX
  921. commands.
  922. This removes the inconvenience of requiring the user to do
  923. shell escapes to do quick UNIX commands.
  924. For systems that support job control, SIGTSTP will stop the entire shell as
  925. well as the process being executed.
  926. When SIGCONT is delivered, both will receive the
  927. signal and the shell will continue to wait for the job to finish.
  928. X.sp
  929. Due to the lack of real job control, input/output redirection and UNIX command
  930. piping, this mode of the shell is not intended to be used as a login shell.
  931. X.sp
  932. If a
  933. X.I Mush
  934. command conflicts with a UNIX command, use the command
  935. X.B sh
  936. to force execution as a shell command.
  937. X.sp
  938. X.I "WARNING: Be aware that Mush commands return message lists, NOT TEXT."
  939. You cannot pipe UNIX or shell commands to or from UNIX commands.
  940. UNIX commands should be simple commands without pipes or metacharacters.
  941. X.sp
  942. This feature is not available for the graphics (tool-based) mode.
  943. X.TP
  944. X.B verbose
  945. X(Boolean)
  946. Passes verbose flag to mail delivery systems when sending mail.
  947. X.TP
  948. X.B verify
  949. X(Boolean)
  950. When through editing messages, just before sending,
  951. X.B verify
  952. will ask you if you want to send, continue editing, or abort the
  953. whole message all together.
  954. X.TP
  955. X.B visual
  956. X(String)
  957. May be set to the visual editor to use when ~v is specified.
  958. Default is vi.
  959. The visual editor is invoked by the \-e arguments to the
  960. commands, 
  961. X.B respond
  962. and
  963. X.BR mail .
  964. X.TP
  965. X.B warning
  966. X(Boolean)
  967. If set, warning messages are printed when:
  968. X.in +4
  969. X.ti -2
  970. X\(bu a command line alias (\*Qcmd\*U) looks like a command.
  971. X.br
  972. For example,
  973. X.ti +2
  974. cmd mail 'set fortune; \\mail'
  975. X.ti +2
  976. cmd respond 'unset fortune; \\respond;'
  977. X.ti -2
  978. X\(bu a variable is set differently from its default value.
  979. X.br
  980. For example, if the escape character is set to something other
  981. that the tilde (~), then a warning message will be printed.
  982. X.ti -2
  983. X\(bu a date format from a message is unknown.
  984. X.br
  985. The date of a message is taken from the \fBDate:\f header.
  986. If the date on that header is unknown, other headers are searched for a
  987. valid date format until a legal one is found.
  988. This date may not be
  989. correct in that it was the date the message was received, not sent.
  990. X.in -4
  991. X.sp
  992. The intent is so that users who are used to their own environments
  993. will be aware of changes in other environments should they be forced
  994. to use them.
  995. There may also be warning messages of failed routines
  996. or assertions which are not fatal enough to interrupt normal running
  997. of the program.
  998. X.TP
  999. X.B wrap
  1000. X(Boolean)
  1001. Normally, when the last message is deleted, the current message
  1002. pointer remains pointing to the last message and the user is done
  1003. reviewing his mail.
  1004. If the
  1005. X.B wrap
  1006. variable is set, the current message pointer will wrap around to the
  1007. beginning of the user's messages again to the next undeleted message.
  1008. This also applies to the
  1009. X.B next
  1010. command.
  1011. X.SH "MAIL ADDRESSES"
  1012. Whenever a command which requires a user address or set of addresses
  1013. is specified
  1014. X.RB ( mail ,
  1015. X.BR reply ,
  1016. X.BR alias ,
  1017. X.BR etc ),
  1018. the addresses given must be separated by commas.
  1019. Most casual users specify addresses that contain no comments or whitespace.
  1020. The simplest addresses are just the login names of the users you wish to send
  1021. your message to:
  1022. X.sp
  1023. X.ti +2
  1024. X\fBmail\fR fred barney wilma betty
  1025. X.sp
  1026. In these cases,
  1027. X.I Mush
  1028. can figure out that they are separate addresses and
  1029. insert commas between addresses automatically.
  1030. X.sp
  1031. X.ti +2
  1032. To: fred, barney, wilma, betty
  1033. X.sp
  1034. Addresses may also contain `!', `@' and `%' characters which are used
  1035. to separate hostnames and the final user name from each other.
  1036. This is primarily used to mail to users on other machines.
  1037. UUCP addresses are specified as
  1038. X.sp
  1039. X.ti +2
  1040. host1!host2!user
  1041. X.sp
  1042. where there may be as many hosts as necessary to route the message
  1043. to the recipient user.
  1044. Here, the user's account is on \*Qhost2\*U
  1045. and that machine is connected to \*Qhost1\*U.
  1046. X.I Domain
  1047. addresses (also called Arpanet and RFC822 addresses) are specified as
  1048. X.sp
  1049. X.ti +2
  1050. user@host.domain
  1051. X.ti +2
  1052. user%host2.domain@host1
  1053. X.sp
  1054. where \*Qdomain\*U is a domain name such as \*Q.berkeley.edu\*U or \*Q.com\*U.
  1055. As in the first example, the user is on \*Qhost2\*U, but that machine talks
  1056. to \*Qhost1\*U.
  1057. It is beyond the scope of this document to discuss in detail the ramifications
  1058. of internetwork mailing.
  1059. More information can be obtained through your system manager.
  1060. X.PP
  1061. X.I Mush
  1062. understands addresses containing a comment field.
  1063. Comment fields do not affect the destination address of mail being sent.
  1064. These fields are purely for
  1065. human legibility and may be specified according to the following constraints: 
  1066. X.sp
  1067. Anything within angle brackets is an address; whatever is outside of the
  1068. address is considered a comment:
  1069. X.sp
  1070. X.ti +2
  1071. Dan Heller <sun!island!argv>
  1072. X.ti +2
  1073. Dan Heller <argv%island@sun.com>
  1074. X.sp
  1075. Anything that has parentheses is a comment; whatever is outside of the
  1076. parentheses is considered the address:
  1077. X.sp
  1078. X.ti +2
  1079. sun!island!argv (Dan Heller)
  1080. X.ti +2
  1081. argv%island@sun.com (Dan Heller)
  1082. X.sp
  1083. Double quotes (") are treated just like parentheses:
  1084. X.sp
  1085. X.ti +2
  1086. X"Dan Heller" sun!island!argv
  1087. X.ti +2
  1088. X"Dan Heller" island!argv@sun.com
  1089. X.sp
  1090. If the comment is to contain a comma, the first case above may not be used;
  1091. you must use either the parenthesis or double-quote cases.
  1092. X.sp
  1093. X.ti +2
  1094. fred@flintstone.bed.rock (Fred Flintstone, Cave Man)
  1095. X.sp
  1096. If the comment contains unbalanced quotes, unpredictable results may occur
  1097. X(Mush won't deliver the mail).
  1098. X.sp
  1099. Since the angle brackets have the highest precedence, quotes or parentheses
  1100. may be used in conjunction with one another.
  1101. X.sp
  1102. X.ti +2
  1103. Yabba Dabba Doo (Fred Flintstone) <fred>
  1104. X.ti +2
  1105. Scoobie "Doobie" Doo <scooby@shaggys.mystery.machine>
  1106. X.PP
  1107. Multiple addresses may appear on a line:
  1108. X.sp
  1109. X.in +2
  1110. island!argv@sun.com argv@garp.mit.edu dheller
  1111. X.in -2
  1112. X.sp
  1113. Because there is no indication of comments (parenthesis, angle bracket,
  1114. or quotes), it is assumed that these are separate addresses and mush will
  1115. insert commas between these addresses accordingly.
  1116. It is for this reason that the user is encouraged to explicitly insert
  1117. commas between all mail addresses and not depend on the automation of comma
  1118. insertion to correctly separate addresses from one another.
  1119. X.PP
  1120. Mail aliases may contain addresses of the form described above.
  1121. X.sp
  1122. X.nf
  1123. X.in +2
  1124. X.ta 1.5i
  1125. alias george    George Jetson <george@spacely.space.sprokets>
  1126. alias jane    Jane Jetson <jane@sky-high.appts>
  1127. alias group    george, jane
  1128. X.in -2
  1129. X.fi
  1130. X.sp
  1131. You can mail using the alias as an address and it will be expanded
  1132. accordingly.
  1133. You can not, however, reference an alias and specify a
  1134. comment or another address at the same time.
  1135. X.sp
  1136. X.ti +2
  1137. To: The Jetsons <group>
  1138. X.sp
  1139. The alias \*Qgroup\*U will not be expanded because the angle brackets
  1140. causes it to be considered as another address entirely.
  1141. X.SH FILES
  1142. X.nf
  1143. X.ta 2.0i
  1144. X/usr/spool/mail/*    Directory for incoming mail
  1145. X~/Mail    Default \fBfolder\fR directory
  1146. X~/mbox    File where old mail is saved
  1147. X~/.mushrc    File giving initial \fIMush\fR commands
  1148. X~/.mailrc    Alternate initialization file
  1149. X~/.edXXXXXXX    Temporary for file for outgoing messages
  1150. X~/.mushXXXXXX    Temporary mail file (copy of current folder)
  1151. X.fi
  1152. X.PP
  1153. Temporary files which are created by the program are always
  1154. created with read/write access to the owner only; group and other
  1155. permissions are never set.
  1156. This is also true for the /usr/spool/mail/* files.
  1157. All other files created by the user via commands internal or external
  1158. to the program have permissions set by the user's default umask.
  1159. If the umask is reset within the program, the mask remains
  1160. intact even after exiting.
  1161. Remember to set the variable
  1162. X.B unix
  1163. before attempting to set the umask value.
  1164. X.PP
  1165. If your system is using Sun Microsystem's NFS, take special note to
  1166. read the manual page for mount(1).
  1167. Filesystems mounted for read/write
  1168. access should be mounted as \*Qhard\*U NFS mounts or you may lose
  1169. mailboxes during a timeout during a write or update.
  1170. X.PP
  1171. Filesystems that use RFS still have bugs to be ironed out in the way
  1172. of owners and permissions concerning utime(2).
  1173. X.SH "SEE ALSO"
  1174. X.IR Mail (1),
  1175. X.IR binmail (1),
  1176. X.IR csh (1),
  1177. X.IR aliases (5),
  1178. X.IR mount (1),
  1179. X.IR mailaddr (7),
  1180. X.IR sendmail (8),
  1181. X.IR printf (3),
  1182. X.IR execl (3),
  1183. X.IR umask (1),
  1184. X.IR utime (2).
  1185. X.SH AUTHOR
  1186. This code was written entirely by Dan Heller and contains no UNIX sources.
  1187. It is also not a modified version of any other mail user agent.
  1188. Similarities
  1189. with any other mailer may have been designed for compatibility reasons.
  1190. X.PP
  1191. argv@spam.istc.sri.com    sun!island!argv
  1192. X.SH BUGS
  1193. The curses interface uses the curses library.
  1194. The routines from the library that are used are the most basic and simple to
  1195. avoid possible bugginess that different versions of UNIX might have.
  1196. However, one unavoidable problem is the reverse video mode.
  1197. Depending on your terminal,
  1198. the termcap entry for it, and the version of curses you are running,
  1199. the reverse video may makes things worse than desired.
  1200. In such situations, the user should set the variable
  1201. X.B no_reverse
  1202. to not get reverse video.
  1203. X\&`^R' may still be entered at runtime in the curses
  1204. interface to toggle reverse video.
  1205. X.PP
  1206. If the program is already running and the system [later] has to swap
  1207. and there is no swap space left, there may be problems.
  1208. One such problem is sending mail.
  1209. If this happens, then sending mail
  1210. will fail and a segmentation fault from the spawned forked child will occur
  1211. unless the -v flag was given to mail.
  1212. The unsent letter will not be removed from the editing file ($home/.edXXXXXX)
  1213. and may be recovered.
  1214. X.PP
  1215. Many functions available to the line oriented mode (shell mode)
  1216. are not available to the tool mode.
  1217. For example,
  1218. X.B pick
  1219. may not be directly accessed although experienced users may find that
  1220. typing pick commands within single backquotes in the \*Qrange\*U panel item
  1221. in the header window will indeed pick messages.
  1222. This is mostly for selecting the \*Qdelete range\*U item
  1223. or the middle mouse button icon in the header panel.
  1224. X.PP
  1225. Shell escapes (of any kind) may not be called from
  1226. the tool/graphics mode.
  1227. The reason for this is that there is no tty
  1228. X.I window
  1229. to run commands from.
  1230. It is impossible to determine whether or not the user wants to run an
  1231. interactive program or not so it is best to disallow its usage all together.
  1232. The experienced window user
  1233. can figure out how to really do shell layers from within the tool mode.
  1234. X.PP
  1235. Toggling from the curses mode to the line mode to get the full
  1236. functionality of the shell/line mode is unfortunately necessary
  1237. in the name of \*Quser friendliness.\*U
  1238. Mostly, this is only necessary
  1239. for piping of commands and using the pick command.
  1240. X.PP
  1241. The function keys and their ability to
  1242. X.I work
  1243. has been variable depending on the version of SunWindows/SunView
  1244. your Sun Workstation has.
  1245. From time to time, it works, but when it
  1246. doesn't, it seems to be related to other user or system definable
  1247. dot-files or whatever.
  1248. I hardly use them, so I haven't had a chance
  1249. to really debug that part much.
  1250. My experiences have shown them to
  1251. work in Sun versions 2.0, 2.2, and 3.3, but not any other version.
  1252. X.PP
  1253. When using
  1254. X.B vi
  1255. in the tool/graphics mode, periodically the window will be one
  1256. line \*Qshort.\*U
  1257. That is, scrolling will be off by one line and you may
  1258. have to redraw the window (using \*Qz.\*U in vi) to get it in sync again.
  1259. This is a known problem with SunWindows, but Sun refuses to fix it
  1260. as SunWindows are \*Qobsolete.\*U
  1261. X.PP
  1262. When running on full filesystems,
  1263. X.I Mush
  1264. may complain or not even run since it needs temporary space with which
  1265. to work.
  1266. Instead of finding new filesystems on it's own,
  1267. X.I Mush
  1268. leaves this task up to the user.
  1269. The workaround is to set the variable
  1270. X.B home
  1271. in the initialization file to be a writable place in a filesystem which
  1272. has enough disk space.
  1273. This will set the user's home directory to be
  1274. set incorrectly, but resetting the home manually once in the shell
  1275. will correct the problem.
  1276. X.PP
  1277. Most of the other known and documented bugs
  1278. are in the supplied README file accompanying the source.
  1279. Of course, the source is an excellent place to look as most known bugs are
  1280. documented right in the source code.
  1281. A good way to track suspicious bugs is to use the
  1282. X.B debug
  1283. command, but note that
  1284. this command is very difficult to use in curses mode.
  1285. END_OF_FILE
  1286. if test 38739 -ne `wc -c <'mush.1.c'`; then
  1287.     echo shar: \"'mush.1.c'\" unpacked with wrong size!
  1288. fi
  1289. # end of 'mush.1.c'
  1290. fi
  1291. echo shar: End of archive 13 \(of 14\).
  1292. cp /dev/null ark13isdone
  1293. MISSING=""
  1294. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
  1295.     if test ! -f ark${I}isdone ; then
  1296.     MISSING="${MISSING} ${I}"
  1297.     fi
  1298. done
  1299. if test "${MISSING}" = "" ; then
  1300.     echo You have unpacked all 14 archives.
  1301.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1302. else
  1303.     echo You still need to unpack the following archives:
  1304.     echo "        " ${MISSING}
  1305. fi
  1306. ##  End of shell archive.
  1307. exit 0
  1308.